package demo;

import java.util.Scanner;

public class didi02 {
    //密集字符串
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while(in.hasNext()) {
            boolean flg = false;//没有遇到过c
            String s = in.next();
            //双指针，每次遇到C记录max，同时重置
            int left = 0;
            int right = 0;
            int max = Integer.MIN_VALUE;
            for(int i = 0;i < s.length();) {
                if(right < s.length() && s.charAt(right) != 'c') {
                    right++;
                } else {
                    flg = true;
                    if(max < right-left+ 1  ) {
                        max = right-left + 1;
                    }
                    left = ++right;

                }

                i++;
            }
            if(max < right-left+ 1  ) {
                max = right-left+ 1 ;
            }
            if(flg){
                //存在C
                System.out.println(max);
            }else{
                //不存在C
                System.out.println(0);
            }


        }
    }
}
